package application.presenter;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.ScrollPane;

import javax.swing.JFrame;

/** @author Krystian */

/** Klasa sluzy jako okno, w ktorym wyswietlany jest graf */

public class GraphWindow extends JFrame {

	private static final long serialVersionUID = 6405092543215262417L;

	/** Konstruktor */
	public GraphWindow(Component component) {

		this.setBackground(Color.white);

		ScrollPane scrollPane = new ScrollPane();
		scrollPane.add(component);
		scrollPane.setPreferredSize(new Dimension((int) component
				.getPreferredSize().getWidth() + 25, (int) component
				.getPreferredSize().getHeight() + 25));

		this.add(scrollPane);
		this.pack();
		this.setTitle("Graf wynikowy");
		this.setVisible(true);
	}

}
